package o;

import android.content.Context;
import android.os.Bundle;

public class bhi {
    private Context ˊ;
    private Bundle ˋ;

    public static class b {
        private Bundle ˊ;
        private Context ˎ;

        public b(Context context) {
            this.ˎ = context;
        }

        public b ˊ(Bundle bundle) {
            this.ˊ = bundle;
            return this;
        }

        public bhi ˏ() {
            bhi o_bhi = new bhi();
            o_bhi.ˊ = this.ˎ;
            o_bhi.ˋ = this.ˊ;
            return o_bhi;
        }
    }

    private bhi() {
    }

    public <T extends bgz> T ˎ(Class<T> cls) {
        T t;
        Throwable e;
        Throwable th;
        try {
            t = (bgz) cls.newInstance();
            try {
                t.ˊ(this.ˋ);
                t.ˊ(this.ˊ);
            } catch (InstantiationException e2) {
                e = e2;
                Logger.ˋ("SegmentBuilder", "newInstance, InstantiationException: ", e);
                return t;
            } catch (IllegalAccessException e3) {
                e = e3;
                Logger.ˋ("SegmentBuilder", "newInstance, IllegalAccessException: ", e);
                return t;
            }
        } catch (Throwable e4) {
            th = e4;
            t = null;
            e = th;
            Logger.ˋ("SegmentBuilder", "newInstance, InstantiationException: ", e);
            return t;
        } catch (Throwable e42) {
            th = e42;
            t = null;
            e = th;
            Logger.ˋ("SegmentBuilder", "newInstance, IllegalAccessException: ", e);
            return t;
        }
        return t;
    }
}
